//
//  LayerLogin.h
//  lhq
//
//  Created by codin on 14-7-24.
//
//

#ifndef __lhq__LayerLogin__
#define __lhq__LayerLogin__

#include "cocos2d.h"
#include "pomelo.h"
#include "LayerHall.h"
#include "CCPomelo.h"

#define GATE_HOST "192.168.136.144"
#define GATE_PORT 3014

class LayerLogin : public cocos2d::Layer
{
public:
    // there's no 'id' in cpp, so we recommend returning the class instance pointer
    static cocos2d::Scene* createScene();

    virtual bool init();
    
    // a selector callback
    //    void menuCloseCallback(cocos2d::Ref* pSender);
    
    // pomelo handle
	void doLogin(cocos2d::Ref* pSender);

    
    // implement the "static create()" method manually
    CREATE_FUNC(LayerLogin);

	 void requstGateCallback(cocos2d::CCNode *node, void *resp);

	 void requstConnectorCallback(cocos2d::CCNode *node, void *resp);


	void init_pomelo();

	//static CCArray* messageQueue;

	//static CCArray* userQueue ;

	//static json_t* userList = NULL;
};

#endif /* defined(__lhq__LayerLogin__) */
